<form action="" class="form-horizontal" role="form">

	<div class="form-group">
		<label class="col-sm-2 control-label">网站名称</label>
		<div class="col-sm-3">
			<input type="text" class="form-control" name="name" placeholder="" datatype="*2-30" value="{$site.name}"/>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label">网站主题</label>
		<div class="col-sm-3">
			<select class="form-control" name="theme">{$site.themesOptions}</select>		
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-2 control-label">首页引导图片</label>
		<div class="col-sm-5">
			<input type="text" id="bg_start" name="bg_start" class="form-control margin-bottom" value="{$site.bg_start}"/>
			<input type="file" name="file_upload" id="bg_start_upload" />
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label">网站背景图片</label>
		<div class="col-sm-5">
			<input type="text" id="bg_pic" name="bg_pic" class="form-control margin-bottom" value="{$site.bg_pic}"/>
			<input type="file" name="file_upload" id="image_upload" />
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label">网站背景音乐</label>
		<div class="col-sm-3">
			<input class="form-control" name="bg_music" value="{$site.bg_music}"/>		
		</div>
	</div>
	
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/indexPost">保存更改</button>
		</div>
	</div>
</form>

<div id="qrcode"></div>
<script src="__PUBLIC__/Style/Common/makeQRCode.js"></script>
<script>
makeQRCode('qrcode', location.href);
</script>
<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}"></script>
<script>
$(function() {
    $("#image_upload").uploadify({
        'multi'			:	false,
        'fileSizeLimit' : 	'200kb',
        'buttonText'	:	'选择图片',
        'fileTypeDesc' 	: 	'Image Files',
        'fileTypeExts' 	: 	'*.jpg; *.png',
        'swf'			: 	'__PUBLIC__/Style/Common/uploadify/uploadify.swf',
        'uploader'		: 	'__MODULE__/Upload/uploadOne',
        'onUploadSuccess'	: function(data, res){
        	
        	var url = eval("(" + res + ")").extra.url;
        	$("#bg_start").val( url );
        	
        }
    });
});

$(function() {
    $("#bg_start_upload").uploadify({
        'multi'			:	false,
        'fileSizeLimit' : 	'200kb',
        'buttonText'	:	'选择图片',
        'fileTypeDesc' 	: 	'Image Files',
        'fileTypeExts' 	: 	'*.jpg; *.png',
        'swf'			: 	'__PUBLIC__/Style/Common/uploadify/uploadify.swf',
        'uploader'		: 	'__MODULE__/Upload/uploadOne',
        'onUploadSuccess'	: function(data, res){
        	
        	var url = eval("(" + res + ")").extra.url;
        	$("#bg_start").val( url );
        	
        }
    });
});
</script>